Integrand size = 29, antiderivative size = 137 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {1}{2} \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) x+\frac {a^3 A \text {arctanh}(\sin (c+d x))}{d}+\frac {b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d} \]
1/2*(6*A*a^2*b+A*b^3+2*B*a^3+3*B*a*b^2)*x+a^3*A*arctanh(sin(d*x+c))/d+1/3* b*(9*A*a*b+8*B*a^2+2*B*b^2)*sin(d*x+c)/d+1/6*b^2*(3*A*b+5*B*a)*cos(d*x+c)* sin(d*x+c)/d+1/3*b*B*(a+b*cos(d*x+c))^2*sin(d*x+c)/d
Time = 1.70 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.16 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {6 \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) (c+d x)-12 a^3 A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 a^3 A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 b \left (4 a A b+4 a^2 B+b^2 B\right ) \sin (c+d x)+3 b^2 (A b+3 a B) \sin (2 (c+d x))+b^3 B \sin (3 (c+d x))}{12 d} \]
(6*(6*a^2*A*b + A*b^3 + 2*a^3*B + 3*a*b^2*B)*(c + d*x) - 12*a^3*A*Log[Cos[ (c + d*x)/2] - Sin[(c + d*x)/2]] + 12*a^3*A*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 9*b*(4*a*A*b + 4*a^2*B + b^2*B)*Sin[c + d*x] + 3*b^2*(A*b + 3 *a*B)*Sin[2*(c + d*x)] + b^3*B*Sin[3*(c + d*x)])/(12*d)
Time = 0.95 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.379, Rules used = {3042, 3469, 3042, 3512, 3042, 3502, 27, 3042, 3214, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3469 |
\(\displaystyle \frac {1}{3} \int (a+b \cos (c+d x)) \left (3 A a^2+b (3 A b+5 a B) \cos ^2(c+d x)+\left (3 B a^2+6 A b a+2 b^2 B\right ) \cos (c+d x)\right ) \sec (c+d x)dx+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (3 A a^2+b (3 A b+5 a B) \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (3 B a^2+6 A b a+2 b^2 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \int \left (6 A a^3+2 b \left (8 B a^2+9 A b a+2 b^2 B\right ) \cos ^2(c+d x)+3 \left (2 B a^3+6 A b a^2+3 b^2 B a+A b^3\right ) \cos (c+d x)\right ) \sec (c+d x)dx+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \int \frac {6 A a^3+2 b \left (8 B a^2+9 A b a+2 b^2 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2+3 \left (2 B a^3+6 A b a^2+3 b^2 B a+A b^3\right ) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (\int 3 \left (2 A a^3+\left (2 B a^3+6 A b a^2+3 b^2 B a+A b^3\right ) \cos (c+d x)\right ) \sec (c+d x)dx+\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (3 \int \left (2 A a^3+\left (2 B a^3+6 A b a^2+3 b^2 B a+A b^3\right ) \cos (c+d x)\right ) \sec (c+d x)dx+\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (3 \int \frac {2 A a^3+\left (2 B a^3+6 A b a^2+3 b^2 B a+A b^3\right ) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (3 \left (2 a^3 A \int \sec (c+d x)dx+x \left (2 a^3 B+6 a^2 A b+3 a b^2 B+A b^3\right )\right )+\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (3 \left (2 a^3 A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+x \left (2 a^3 B+6 a^2 A b+3 a b^2 B+A b^3\right )\right )+\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{3} \left (\frac {1}{2} \left (\frac {2 b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{d}+3 \left (\frac {2 a^3 A \text {arctanh}(\sin (c+d x))}{d}+x \left (2 a^3 B+6 a^2 A b+3 a b^2 B+A b^3\right )\right )\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
(b*B*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + ((b^2*(3*A*b + 5*a*B)*Co s[c + d*x]*Sin[c + d*x])/(2*d) + (3*((6*a^2*A*b + A*b^3 + 2*a^3*B + 3*a*b^ 2*B)*x + (2*a^3*A*ArcTanh[Sin[c + d*x]])/d) + (2*b*(9*a*A*b + 8*a^2*B + 2* b^2*B)*Sin[c + d*x])/d)/2)/3
3.3.34.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[(-b)*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x])^( n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a^2*A*d*(m + n + 1) + b*B*(b*c*( m - 1) + a*d*(n + 1)) + (a*d*(2*A*b + a*B)*(m + n + 1) - b*B*(a*c - b*d*(m + n)))*Sin[e + f*x] + b*(A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*Sin [e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && !(IGt Q[n, 1] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.92 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.99
method | result | size |
parts | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {\left (A \,b^{3}+3 B a \,b^{2}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (3 A a \,b^{2}+3 B \,a^{2} b \right ) \sin \left (d x +c \right )}{d}+\frac {\left (3 A \,a^{2} b +B \,a^{3}\right ) \left (d x +c \right )}{d}+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}\) | \(135\) |
parallelrisch | \(\frac {-12 A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+3 \left (A \,b^{3}+3 B a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+B \sin \left (3 d x +3 c \right ) b^{3}+9 \left (4 A a \,b^{2}+4 B \,a^{2} b +B \,b^{3}\right ) \sin \left (d x +c \right )+36 x \left (A \,a^{2} b +\frac {1}{6} A \,b^{3}+\frac {1}{3} B \,a^{3}+\frac {1}{2} B a \,b^{2}\right ) d}{12 d}\) | \(139\) |
derivativedivides | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \left (d x +c \right )+3 A \,a^{2} b \left (d x +c \right )+3 B \sin \left (d x +c \right ) a^{2} b +3 A \sin \left (d x +c \right ) a \,b^{2}+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,b^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(151\) |
default | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \left (d x +c \right )+3 A \,a^{2} b \left (d x +c \right )+3 B \sin \left (d x +c \right ) a^{2} b +3 A \sin \left (d x +c \right ) a \,b^{2}+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,b^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(151\) |
risch | \(3 x A \,a^{2} b +\frac {x A \,b^{3}}{2}+a^{3} B x +\frac {3 x B a \,b^{2}}{2}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} A a \,b^{2}}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{2} b}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,b^{3}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} A a \,b^{2}}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{2} b}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,b^{3}}{8 d}+\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {\sin \left (3 d x +3 c \right ) B \,b^{3}}{12 d}+\frac {\sin \left (2 d x +2 c \right ) A \,b^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) B a \,b^{2}}{4 d}\) | \(247\) |
norman | \(\frac {\left (3 A \,a^{2} b +\frac {1}{2} A \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}\right ) x +\left (3 A \,a^{2} b +\frac {1}{2} A \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{2} b +2 A \,b^{3}+4 B \,a^{3}+6 B a \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{2} b +2 A \,b^{3}+4 B \,a^{3}+6 B a \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (18 A \,a^{2} b +3 A \,b^{3}+6 B \,a^{3}+9 B a \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {b \left (6 A a b -A \,b^{2}+6 B \,a^{2}-3 B a b +2 B \,b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \left (6 A a b +A \,b^{2}+6 B \,a^{2}+3 B a b +2 B \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b \left (54 A a b -3 A \,b^{2}+54 B \,a^{2}-9 B a b +10 B \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {b \left (54 A a b +3 A \,b^{2}+54 B \,a^{2}+9 B a b +10 B \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(426\) |
A*a^3/d*ln(sec(d*x+c)+tan(d*x+c))+(A*b^3+3*B*a*b^2)/d*(1/2*cos(d*x+c)*sin( d*x+c)+1/2*d*x+1/2*c)+(3*A*a*b^2+3*B*a^2*b)/d*sin(d*x+c)+(3*A*a^2*b+B*a^3) /d*(d*x+c)+1/3*B*b^3/d*(2+cos(d*x+c)^2)*sin(d*x+c)
Time = 0.30 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.96 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {3 \, A a^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, A a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, B a^{3} + 6 \, A a^{2} b + 3 \, B a b^{2} + A b^{3}\right )} d x + {\left (2 \, B b^{3} \cos \left (d x + c\right )^{2} + 18 \, B a^{2} b + 18 \, A a b^{2} + 4 \, B b^{3} + 3 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \]
1/6*(3*A*a^3*log(sin(d*x + c) + 1) - 3*A*a^3*log(-sin(d*x + c) + 1) + 3*(2 *B*a^3 + 6*A*a^2*b + 3*B*a*b^2 + A*b^3)*d*x + (2*B*b^3*cos(d*x + c)^2 + 18 *B*a^2*b + 18*A*a*b^2 + 4*B*b^3 + 3*(3*B*a*b^2 + A*b^3)*cos(d*x + c))*sin( d*x + c))/d
\[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\int \left (A + B \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right )^{3} \sec {\left (c + d x \right )}\, dx \]
Time = 0.21 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.06 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {12 \, {\left (d x + c\right )} B a^{3} + 36 \, {\left (d x + c\right )} A a^{2} b + 9 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{2} + 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{3} - 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B b^{3} + 12 \, A a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 36 \, B a^{2} b \sin \left (d x + c\right ) + 36 \, A a b^{2} \sin \left (d x + c\right )}{12 \, d} \]
1/12*(12*(d*x + c)*B*a^3 + 36*(d*x + c)*A*a^2*b + 9*(2*d*x + 2*c + sin(2*d *x + 2*c))*B*a*b^2 + 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*b^3 - 4*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*b^3 + 12*A*a^3*log(sec(d*x + c) + tan(d*x + c) ) + 36*B*a^2*b*sin(d*x + c) + 36*A*a*b^2*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (129) = 258\).
Time = 0.33 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.29 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {6 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (2 \, B a^{3} + 6 \, A a^{2} b + 3 \, B a b^{2} + A b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
1/6*(6*A*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 6*A*a^3*log(abs(tan(1/2* d*x + 1/2*c) - 1)) + 3*(2*B*a^3 + 6*A*a^2*b + 3*B*a*b^2 + A*b^3)*(d*x + c) + 2*(18*B*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 18*A*a*b^2*tan(1/2*d*x + 1/2*c)^ 5 - 9*B*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 3*A*b^3*tan(1/2*d*x + 1/2*c)^5 + 6* B*b^3*tan(1/2*d*x + 1/2*c)^5 + 36*B*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*A*a* b^2*tan(1/2*d*x + 1/2*c)^3 + 4*B*b^3*tan(1/2*d*x + 1/2*c)^3 + 18*B*a^2*b*t an(1/2*d*x + 1/2*c) + 18*A*a*b^2*tan(1/2*d*x + 1/2*c) + 9*B*a*b^2*tan(1/2* d*x + 1/2*c) + 3*A*b^3*tan(1/2*d*x + 1/2*c) + 6*B*b^3*tan(1/2*d*x + 1/2*c) )/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 2.04 (sec) , antiderivative size = 1924, normalized size of antiderivative = 14.04 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\text {Too large to display} \]
(tan(c/2 + (d*x)/2)*(A*b^3 + 2*B*b^3 + 6*A*a*b^2 + 3*B*a*b^2 + 6*B*a^2*b) + tan(c/2 + (d*x)/2)^3*((4*B*b^3)/3 + 12*A*a*b^2 + 12*B*a^2*b) + tan(c/2 + (d*x)/2)^5*(2*B*b^3 - A*b^3 + 6*A*a*b^2 - 3*B*a*b^2 + 6*B*a^2*b))/(d*(3*t an(c/2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 + 1)) + (atan(((((A*b^3*1i)/2 + B*a^3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*(32*A*a^ 3 + 16*A*b^3 + 32*B*a^3 + 96*A*a^2*b + 48*B*a*b^2) + tan(c/2 + (d*x)/2)*(3 2*A^2*a^6 + 8*A^2*b^6 + 32*B^2*a^6 + 96*A^2*a^2*b^4 + 288*A^2*a^4*b^2 + 72 *B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 48*A*B*a*b^5 + 192*A*B*a^5*b + 320*A*B*a^3 *b^3))*((A*b^3*1i)/2 + B*a^3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*1i - (((A*b ^3*1i)/2 + B*a^3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*(32*A*a^3 + 16*A*b^3 + 32*B*a^3 + 96*A*a^2*b + 48*B*a*b^2) - tan(c/2 + (d*x)/2)*(32*A^2*a^6 + 8*A ^2*b^6 + 32*B^2*a^6 + 96*A^2*a^2*b^4 + 288*A^2*a^4*b^2 + 72*B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 48*A*B*a*b^5 + 192*A*B*a^5*b + 320*A*B*a^3*b^3))*((A*b^3* 1i)/2 + B*a^3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*1i)/((((A*b^3*1i)/2 + B*a^ 3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*(32*A*a^3 + 16*A*b^3 + 32*B*a^3 + 96*A *a^2*b + 48*B*a*b^2) + tan(c/2 + (d*x)/2)*(32*A^2*a^6 + 8*A^2*b^6 + 32*B^2 *a^6 + 96*A^2*a^2*b^4 + 288*A^2*a^4*b^2 + 72*B^2*a^2*b^4 + 96*B^2*a^4*b^2 + 48*A*B*a*b^5 + 192*A*B*a^5*b + 320*A*B*a^3*b^3))*((A*b^3*1i)/2 + B*a^3*1 i + A*a^2*b*3i + (B*a*b^2*3i)/2) + (((A*b^3*1i)/2 + B*a^3*1i + A*a^2*b*3i + (B*a*b^2*3i)/2)*(32*A*a^3 + 16*A*b^3 + 32*B*a^3 + 96*A*a^2*b + 48*B*a...